{extend name="common/base-xml" /}
<!--title-->
{block name="titlekeyword"}
<title>{$content}</title>

{/block}
<!--下面 每个页面的特色css-->
{block name="titleStyle"}
<style type="text/css">
	div,span{
	   width: 140px;
	   height: 140px;
	   margin: 20px;
	   background: #9999CC;
	   border: #000 1px solid;
	   float:left;
	   font-size: 17px;
	   font-family:Roman;
   }
   
   div.mini{
	   width: 30px;
	   height: 30px;
	   background: #CC66FF;
	   border: #000 1px solid;
	   font-size: 12px;
	   font-family:Roman;
   }
   
   div.visible{
	   display:none;
   }
</style>

{/block}
<!--代码主要内容-->
{block name="main"}
<h6>内容</h6>
<form action="" name="form1" id="form1">
	<input type="text" name="username" id="username" value="zhang"><br>
	<input type="text" name="psw" id="psw" value="99999"><br>
	<input type="button" id="b1" value="登陆">
</form>

<div id="one">		
</div>
<h6>代码</h6>
<pre>


	 </pre> {/block}
<!--底部js 在这里是js的实际代码区-->
{block name="footjs"}
<script src="__ROOT__/static/js/jquery-1.3.1.js"></script>
<script language="javascript">
$('#b1').click(function(){
	var send_data={"username":$("#username").val(),"psw":$("#psw").val()};

			//xml格式->dom
			var xmlHttpRequest=$.post("../Rejest/chec2",send_data,function(data,ts){
				console.log(data);
			

		      var xmlObjs=xmlHttpRequest.responseXML;
			   console.log(xmlObjs);
				//dom方法来解析
				var res=xmlObjs.getElementsByTagName('res');
				window.alert(res[0].childNodes[0].nodeValue);
				res = res[0].childNodes[0].nodeValue
				//写入id 为
			 var one = document.getElementById('one');
			one.innerText = res;
				
				})
		//		})
	})
</script> {/block}